{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}

<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li>
			<a href="{:url('index')}">商家公众号</a>
		</li>
	</ol>
</div>
<div class="ibox float-e-margins">
	{include file="wechat/top"}
	
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">
					<input type="hidden" name="id" value="{$ad.id}" />
					<div class="form-group">
						<label class="col-sm-3 control-label">公众号名称：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="publicname" name="publicname" value="{$ad.publicname}"  class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">公众号原始ID：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="publicid" name="publicid" value="{$ad.publicid}"  class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">AppID：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="appid" name="appid" value="{$ad.appid}"  class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">AppSecret：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="appsecret" name="appsecret" value="{$ad.appsecret}"  class="form-control" />
						</div>
					</div>	
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">Token：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="token" name="token" value="{$ad.token}"  class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">EncodingAESKey：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="encodingaeskey" name="encodingaeskey" value="{$ad.encodingaeskey}"  class="form-control" />
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">电脑端账号绑定：</label>
						<div class="input-group col-sm-4">
							<div class="switch">
                            <div class="onoffswitch">
                                <input type="checkbox" name="switch" checked="" class="onoffswitch-checkbox" id="pcbindstatus"  value="{$ad.pcbindstatus}">
                                <label class="onoffswitch-label" for="pcbindstatus">
                                    <span class="onoffswitch-inner" ></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                      		</div>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">状态：</label>
						<div class="input-group col-sm-4">
							<div class="switch">
                            <div class="onoffswitch">
                                <input type="checkbox" name="switch" checked="" class="onoffswitch-checkbox" id="status"  value="{$ad.status}">
                                <label class="onoffswitch-label" for="status">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                      		</div>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">URL服务器地址：</label>
						<div class="input-group col-sm-4">
							http://test.ilong3.cn/wechat
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">网页授权回调域名：</label>
						<div class="input-group col-sm-4">
							http://a2.ilong3.cn
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 保存</button>
						</div>
					</div>
				</form>
			</div>
		
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
	$("#li-bar-index").addClass("active");
	$(function() {
		$("#myForm").validate({
			rules: {
				publicname: "required",
				publicid:"required"
			},
			messages: {
				publicname: ICON.error + "请输入公众号名称",
				publicid:ICON.error + "请输入公众号ID"
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}